@layout("/common/_container.html",{js:["/assets/hx/storage/hxStorageManage/hxStorageManage.js"]}){

<!--<script src="https://unpkg.com/xlsx/dist/xlsx.full.min.js"></script>-->
<script src="assets/excel/xlsx.full.min.js"></script>

<style>
 /*输入框样式 */
.layui-table-cell {
    height: 36px;
    line-height: 36px;
}
.unit-input {
    border: 1px solid #91c486; /* 边框颜色 */
    border-radius: 4px; /* 边框圆角 */
    padding: 8px 10px; /* 内边距 */
    width: 100%; /* 宽度 */
    box-sizing: border-box; /* 边框计算在宽度内 */
    font-size: 14px; /* 字体大小 */
}
 /*防止下拉框的下拉列表被隐藏---必须设置--- */
.layui-table-cell {
    overflow: visible !important;
}
</style>

<div class="layui-body-header">
    <span class="layui-body-header-title">拣货单表管理</span>
</div>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <button id="btnFinish" class="layui-btn layui-btn-normal"><i class="layui-icon layui-icon-print"></i>审核</button>
                                <button id="btnToVoid" class="layui-btn icon-btn layui-btn-danger"><i class="layui-icon">&#x1006;</i>作废</button>
                            </div>
                            <!--<div class="layui-inline">
                                <select id="printNumb">
                                    <option value="">标签打印状态</option>
                                    <option value="已打印">已打印</option>
                                    <option value="未打印">未打印</option>
                                </select>
                            </div>-->
                            <!--<div class="layui-inline">
                                <select id="printNum">
                                    <option value="">发货单打印状态</option>
                                    <option value="已打印">已打印</option>
                                    <option value="未打印">未打印</option>
                                </select>
                            </div>-->
                            <div class="layui-inline">
                                <select id="storageState">
                                    <option value="">选择状态</option>
                                    <option value="制单">制单</option>
                                    <option value="审核">审核</option>
                                    <!--<option value="拣货中止">拣货中止</option>
                                    <option value="待拣货">待拣货</option>
                                    <option value="拣货中">拣货中</option>
                                    <option value="拣货完成">拣货完成</option>
                                    <option value="待复核">待复核</option>
                                    <option value="复核中">复核中</option>
                                    <option value="已完成">已完成</option>-->
                                </select>
                            </div>
                            <!--<div class="layui-inline">
                                <select id="startState">
                                    <option value="">发车状态</option>
                                    <option value="未发车">未发车</option>
                                    <option value="已发车">已发车</option>
                                </select>
                            </div>-->

                            <div class="layui-inline">
                                <select id="timeType">
                                    <option value="cj">创建时间</option>
                                    <option value="ps">配送日</option>
                                    <option value="fj">分拣完成时间</option>
                                    <option value="fh">复核完成时间</option>
                                </select>
                            </div>
                            <div class="layui-inline" style="width: 150px;">
                                <input id="startTime" class="layui-input" autocomplete="off" type="text" placeholder="开始日期从"/>
                            </div>
                            <div class="layui-inline">
                                一
                            </div>
                            <div class="layui-inline" style="width: 150px;">
                                <input id="endTime" class="layui-input" autocomplete="off" type="text" placeholder="结束日期至"/>
                            </div>
                            <div class="layui-inline" style="width: 150px;">
                                <input id="startTime2" class="layui-input" autocomplete="off" type="text" placeholder="开始时间从"/>
                            </div>
                            <div class="layui-inline">
                                一
                            </div>
                            <div class="layui-inline" style="width: 150px;">
                                <input id="endTime2" class="layui-input" autocomplete="off" type="text" placeholder="结束时间至"/>
                            </div>
                            <br>
                            <div class="layui-inline">
                                <select id="customerId">
                                    <option value="">选择客户</option>
                                    @for(item in customerlist!){
                                    <option value="${item.id}">${item.customerName}</option>
                                    @}
                                </select>
                            </div>
                            <div class="layui-inline">
                                <select id="setWarehouseId">
                                    <option value="">选择仓库</option>
                                    @for(item in basicWarehouseList!){
                                    <option value="${item.id}">${item.warehouseName}</option>
                                    @}
                                </select>
                            </div>
                            <div class="layui-inline">
                                <select id="orderType" name="orderType" lay-filter="orderType" lay-verify="" required>
                                    <option value="">选择类型</option>
                                    <option value="门店调出">门店调出</option>
                                    <option value="批发销售">批发销售</option>
                                    <option value="采购退货">采购退货</option>
                                    <option value="调整出库">调整出库</option>
                                    <option value="仓间调拨">仓间调拨</option>
                                    <option value="盘亏出库">盘亏出库</option>
                                </select>
                            </div>
      <!--                      <div class="layui-inline">
                                <input id="areaName" class="layui-input" type="text" placeholder="库区"/>
                            </div>-->
                    <!--        <div class="layui-inline">
                                <select id="scattered">
                                    <option value="">是否拆零</option>
                                    <option value="拆零">拆零</option>
                                    <option value="整件">整件</option>
                                </select>
                            </div>-->
                            <div class="layui-inline">
                                <input id="getUnit" class="layui-input" type="text" placeholder="收货客户"/>
                                <button type="button" class="layui-btn layui-btn-primary" id="choiceGetUnit" style="position: absolute;right: 1px;cursor: pointer;top: 2px"><i class="layui-icon">&#xe615;</i></button>
                            </div>
                            <div class="layui-inline">
                                <input id="condition" class="layui-input" type="text" placeholder="单号"/>
                            </div>
                            <div class="layui-inline">
                                <input id="associationOrder" class="layui-input" type="text" placeholder="出库订单号"/>
                            </div>
                            <div class="layui-inline">
                                <input id="goodsName" class="layui-input" type="text" placeholder="商品档案"/>
                                <button type="button" class="layui-btn layui-btn-primary" id="choiceGoods" style="position: absolute;right: 1px;cursor: pointer;top: 2px"><i class="layui-icon">&#xe615;</i></button>
                            </div>
                            <!--<div class="layui-inline">
                                <input id="trayNumber" class="layui-input" type="text" placeholder="托盘号"/>
                            </div>
                            <div class="layui-inline">
                                <input id="storageUserName" class="layui-input" type="text" placeholder="分拣员"/>
                            </div>
                            <div class="layui-inline">
                                <input id="qualityUserName" class="layui-input" type="text" placeholder="复核员"/>
                            </div>-->
                            <br>
                            <div class="layui-inline">
                                <button id="btnPrint" class="layui-btn layui-btn-normal"><i class="layui-icon layui-icon-print"></i>打印发货单</button>
                                <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
                                <button id="reset" class="layui-btn icon-btn layui-btn-primary"><i class="layui-icon">&#xe666;</i>重置</button>
                                <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>
                                <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>导出</button>
                                <button id="pullXlbOutStorageManage" class="layui-btn icon-btn"><i class="layui-icon">&#xe601;</i>拉取新零帮出库单</button>
                            </div>
                        </div>
                    </div>
                    <table class="layui-table" id="hxStorageOutTable" lay-filter="hxStorageOutTable"></table>
                    <table class="layui-table" id="hxStorageOutDetailedTable" lay-filter="hxStorageOutDetailedTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="toolbarfromDetailed">
    <div class="layui-inline">
        <input id="condition2" class="layui-input" type="text" placeholder="关键词"/>
    </div>
    <div class="layui-inline">
        <button id="btnSearchDetailed" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
        <button id="btnAddDetailed" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>新增</button>
    </div>
</script>

<script type="text/html" id="storageStateTpl">
    {{#  if(d.storageState === '已完成'){ }}
    <span style="color: #43CF7C; font-weight: 600;">{{ d.storageState }}</span>
    {{#  } else if (d.storageState === '审核'){ }}
    <span style="color: #007BFF; font-weight: 600;">{{ d.storageState }}</span>
    {{#  } else { }}
    <span style="color: #FFC300; font-weight: 600;">{{ d.storageState }}</span>
    {{#  } }}
</script>

<script type="text/html" id="startStateTpl">
    {{#  if(d.startState != '已发车'){ }}
    <span style="color: #FFC300;font-weight: 600;">{{ d.startState }}</span>
    {{#  } else { }}
    <span style="color: #43CF7C;font-weight: 600;">{{ d.startState }}</span>
    {{#  } }}
</script>

<script type="text/html" id="tableBarDetailed">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="deleteDetailed" id="deleteDetailed">删除</a>
    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="choiceOutPositionNumber" id="choiceOutPositionNumber">选择库位</a>
</script>

<!--<script type="text/html" id="toolbarPosition">
    <button type="button" id="choiceOutPositionNumber" class="layui-btn layui-btn-primary"
    style="position: absolute; right: 1px;cursor: pointer; top: 2px">
    <i class="layui-icon">&#xe615;</i></button>
</script>-->


<!--<script type="text/html" id="toolbarPosition">
&lt;!&ndash;    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="choiceOutPositionNumber" id="choiceOutPositionNumber">删除</a>&ndash;&gt;
    <button type="button" id="choiceOutPositionNumber"
            lay-event="choiceOutPositionNumber"
            class="layui-btn layui-btn-primary"
            style="position: absolute; right: 1px;cursor: pointer; top: 2px">
        <i class="layui-icon">&#xe615;</i></button>
</script>-->

@}